package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.FamilyMemberElder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder> {


    @Insert("insert into family_member_elder (family_member_id, elder_id, remark,create_time) values (#{familyMemberId},#{elderId},#{remark},NOW());")
    void add(FamilyMemberElder addElderFamily);

    @Select("select id, family_member_id, elder_id, remark from family_member_elder where family_member_id = #{userId};")
    List<FamilyMemberElder> selectByFamilyMemberId(Long userId);
}
